package com.fantsey.pattern.singleton;

public class SingletonDemo {
    public static void main(String[] args) {
        //不合法的构造函数
        //编译时错误：构造函数 SingleObject() 是不可见的
        //SingletonObject singletonObject = new SingletonObject();

        SingletonObject singletonObject = SingletonObject.getInstance();
        singletonObject.showMessage();
    }
}
